#include"stdio.h"

float sum_elements(float a[],unsigned length)
{
    int i;
    float result;
    
    for(i=0;i<=length-1;i++)
    {
      result+=a[i];
     return result;
     }
}
void main()
{
     int a[3]={1.0,0.0,2.1};
     int len=3;
     printf("%f",sum_elements(a[3],3));
}
